﻿using LiveCharts;
using Prism.Mvvm;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace 出货绑定
{
    public class MainViewModel: BindableBase
    {
        private ChartValues<int> _Pass = new ChartValues<int> { 0 };
        public ChartValues<int> Pass
        { get => _Pass; set { _Pass = value; RaisePropertyChanged("Pass"); } }

        private ChartValues<int> _Wait = new ChartValues<int> { 0 };
        public ChartValues<int> Wait
        { get => _Wait; set { _Wait = value; RaisePropertyChanged("Wait"); } }
        private ObservableCollection<Item> _Items = new ObservableCollection<Item>() { };
        public ObservableCollection<Item> Items
        {
            get => _Items;
            set { _Items = value; RaisePropertyChanged("Items"); }
        }
        public class Item : BindableBase
        {
            int _No;

            public int No
            {
                get { return _No; }
                set { _No = value; RaisePropertyChanged("No"); }
            }
            string _MaterCode;

            public string MaterCode
            {
                get { return _MaterCode; }
                set { _MaterCode = value; RaisePropertyChanged("MaterCode"); }
            }
            string _MoCode;

            public string MoCode
            {
                get { return _MoCode; }
                set { _MoCode = value; RaisePropertyChanged("MoCode"); }
            }
            string _BatchCode;

            public string BatchCode
            {
                get { return _BatchCode; }
                set { _BatchCode = value; RaisePropertyChanged("BatchCode"); }
            }

            string _LabelCode;

            public string LabelCode
            {
                get { return _LabelCode; }
                set { _LabelCode = value; RaisePropertyChanged("LabelCode"); }
            }
            SolidColorBrush _BackColor = new SolidColorBrush(Colors.LightGray);
            public SolidColorBrush BackColor
            {
                get { return _BackColor; }
                set { _BackColor = value; RaisePropertyChanged("BackColor"); }
            }
        }
    }
}
